import request from '@/router/axios'

// 查询销售商品类别列表
export function fetchCtgSaleList(query) {
  return request({
    url: '/eims/ctgsale/list',
    method: 'get',
    params: query
  })
}

// 查询仓位配置完成的列表
export function fetchStockConfigDoneList(query) {
  return request({
    url: '/eims/stockconfig/getStockConfigDoneList',
    method: 'get',
    params: query
  })
}

// 根据部门ID查询仓位配置
export function fetchStockConfigByDeptId(obj) {
  return request({
    url: '/eims/stockconfig/list',
    method: 'get',
    params: obj
  })
}

export function fetchDeptList(query) {
	return request({
		url: '/admin/dept/getDeptList',
		method: 'get',
		params: query
	})
}
export function fetchStockConfigList(query) {
  return request({
    url: '/eims/stockconfig/page',
    method: 'get',
    params: query
  })
}

export function addStockConfigObj(obj) {
  return request({
    url: '/eims/stockconfig',
    method: 'post',
    data: obj
  })
}

export function getStockConfigObj(id) {
  return request({
    url: '/eims/stockconfig/' + id,
    method: 'get'
  })
}

export function delStockConfigObj(id) {
  return request({
    url: '/eims/stockconfig/' + id,
    method: 'delete'
  })
}

export function putStockConfigObj(obj) {
  return request({
    url: '/eims/stockconfig',
    method: 'put',
    data: obj
  })
}
